package InheritanceAndRewriting;

public class S4_1 {
    public static void main(String[] args) {
        // 创建 Animal 对象
        Animal animal = new Animal("Buddy", 5, "Dog", "House");

        // 创建 Monkey 对象
        Monkey monkey = new Monkey("Chico", 3, "Monkey", "Jungle", "Swinging", 15.5);

        // 显示基本信息
        animal.displayInfo();
        monkey.displayInfo();

        // 发出声音
        animal.makeSound();
        monkey.makeSound();

        // 吃东西
        animal.eat();
        monkey.eat();

        // 猴子爬树
        monkey.climbTree();
    }
}
